import axios from 'axios'

export function addGoods(data) { //发布土特产
  const url = baseURL + 'ttc.php/Goods/addGoods'
  return axios.post(url, data, {
    headers: {'Content-Type': 'application/x-www-form-urlencoded'}
  }).then(res => {
    return res.data;
  })
}

export function goodsLists(data) { //发布列表
  const url = baseURL + 'ttc.php/Goods/GoodsLists'
  return axios.post(url, data, {
    headers: {'Content-Type': 'application/x-www-form-urlencoded'}
  }).then(res => {
    return res.data;
  })
}

export function goodsDetails(data) {//产品详情
  const url = baseURL + 'ttc.php/Goods/GoodsInfo'
  return axios.post(url, data, {
    headers: {'Content-Type': 'application/x-www-form-urlencoded'}
  }).then(res => {
    return res.data;
  })
}

export function goodsContacts(data) { //获取联系人
  const url = baseURL + 'ttc.php/Goods/GoodsContacts'
  return axios.post(url, data, {
    headers: {'Content-Type': 'application/x-www-form-urlencoded'}
  }).then(res => {
    return res.data;
  })
}

